//
//  EMRequestModel.h
//  EasyMoney
//
//  Created by zh on 2019/12/14.
//  Copyright © 2019 zh. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EMNetClient.h"

NS_ASSUME_NONNULL_BEGIN

typedef void(^RequestSuccessBlock)(id response, NSString* message);
typedef void(^RequestFailureBlock)(NSInteger errorCode, NSString *errorMessage, NSError *error);

@interface EMRequestModel : NSObject<YYModel>

@property (nonatomic, copy) NSString *requestMethodKey;

@property (nonatomic, assign) BOOL isPostForRequest;

@property (nonatomic, copy) NSString* responseClassName;

- (NSDictionary *)params;

- (void)requestSuccess:(RequestSuccessBlock)success failure:(RequestFailureBlock)failure;

- (void)uploadConstructBlock:(void (^)(id <AFMultipartFormData> formData))constructBlock progress:(void(^)(NSProgress *))progress success:(RequestSuccessBlock)success failure:(RequestFailureBlock)failure;

@end

NS_ASSUME_NONNULL_END
